


$(function(){
	//初始化列表查询
    paging(1);
});


checkallmethod=function(){
    $('.checkAll').click(function(){
        if($(this).is(':checked')){
            $('.content_table .checkinput').attr('checked','checked');
            $(this).attr('title','取消全选')
        }else{
            $('.content_table .checkinput').removeAttr('checked');
            $(this).attr('title','全选')
        }
    })
}

function paging(pageNo){
    $.ajax({
        url: "pagingItems.do",
        type: "post",
        dataType: 'json',
        async: false,
        data: {
        	"applicationid":applicationid,
            "iPageNo": pageNo
        },
        error: function (data) {
        	layer.msg('出错了！！',{time:2000});
        },
        success: function (jsons) {
        	if(jsons.code == 500){
        		//alert(jsons.eroorMessage);
                layer.msg(jsons.errorMessage,{time:2000});
        	}else if (jsons.code == 201){
        		//alert("数据为空！");
                layer.msg("数据为空！",{time:2000});
        	}else{
        		unifiedPaging(jsons.pageData);
        	}
        }
    })
    checkallmethod();
}

see_btn=function(obj){
    //绑定查看按钮
	var Id=$(obj).parent().parent().attr("ID");
	layer.open({
		extend:['skin/layer_iframe.css'],
        skin:'layer-ext-skin-layer_iframe.css',
        type:2,
        title:'查看监控项',
        area:['800px','500px'],
        content:'showItems.do?applicationid='+Id,
        maxmin: true,
        shadeClose: true
    });
}
